class TicketMailsController < ApplicationController
  layout 'base'
  before_filter :find_project, :authorize
  
  def show
   #button to fetch email
   #get number of remote /  list of emails
   m = TicketMail.new(params[:id])
   @status = m.get_status
  end
  
  def create
    m = TicketMail.new(params[:id])
    @issues = m.process_all
    @status = m.get_status
    render :action => "show"
  end
  
  
private
  def find_project   
    @project = Project.find(params[:id])
  rescue ActiveRecord::RecordNotFound
    render_404
  end
end
